/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tiebreak.UI;

import java.awt.FlowLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

/**
 *
 * @author AngelwingedDevil
 */
public class AddMember extends JFrame {
    private MemberForm form;
    public AddMember()
    {
        initComponents();
        setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        setTitle("Add new Member");
        setSize(getPreferredSize());
        setResizable(false);
        setVisible(true);
    }

    private void initComponents()
    {
        form = new MemberForm();
        JPanel buttonPanel = new JPanel();
        JButton add = new JButton("Add");
        JButton cancel = new JButton("Cancel");
        getContentPane().setLayout(new GridBagLayout());
        buttonPanel.setLayout(new FlowLayout());
        buttonPanel.add(add);
        buttonPanel.add(cancel);
        GridBagConstraints g = new GridBagConstraints();
        g.weightx=0;
        g.weighty=0;
        g.gridx=0;
        g.gridy=GridBagConstraints.RELATIVE;
        g.insets=new Insets(TieBreakConstraints.MEDIUMSPACE, TieBreakConstraints.MEDIUMSPACE, 0, TieBreakConstraints.MEDIUMSPACE);
        g.fill=GridBagConstraints.BOTH;
        getContentPane().add(form,g);
        
        g.insets=new Insets(0, TieBreakConstraints.MEDIUMSPACE, TieBreakConstraints.MEDIUMSPACE, TieBreakConstraints.MEDIUMSPACE);
        getContentPane().add(buttonPanel,g);
    }

}
